



import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';


main()=> runApp(CLMyapp());

class CLMyapp extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return MaterialApp(
        home: CLbody()
    );
  }
}


class CLbody extends StatelessWidget{

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return
      Scaffold(
        appBar: AppBar(
          title:Text("按钮") ,
        ),
        body:  CLbodycontent(),
        floatingActionButton: FloatingActionButton(
          child: Icon(Icons.add),
          onPressed: (){
            print('jh');
          },
        ),


      );
  }
}
class CLbodycontent extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    // TODO: implement createState
    return _CLbodycontentState();
  }
}

class _CLbodycontentState extends State<CLbodycontent> {
  @override
  Widget build(BuildContext context) {
    return
      Column(
        crossAxisAlignment: CrossAxisAlignment.center,
        //mainAxisAlignment: MainAxisAlignment.center,
        children:  [
          RaisedButton(
            child: Text("j"),
            textColor: Colors.pink,
            onPressed:(){
              print("hh");
            },
          ),
          FlatButton(
            child: Text("HI"),
            color: Colors.orange,
            onPressed: (){
              print("j");
            },
          ),
          OutlineButton(
              child: Text("hj"),
              color: Colors.red,
              onPressed: (){
                print("j");
              }),
          FlatButton(
            shape: RoundedRectangleBorder(
                borderRadius: BorderRadius.circular(8)
            ),
            color: Colors.orange,
            onPressed: (){
              print("dd");
            },
            child: Row(
              mainAxisSize: MainAxisSize.min,
              children: [
                Icon(Icons.favorite),
                Text("自定义按钮")
              ],
            ),
          )


        ],
      );

  }
}

